﻿using System;
using System.Collections.Generic;

namespace TianShu.Data
{
    public class ConnectionStrings : Dictionary<string, string>
    {
        public const string DefaultConnectionStringName = "Default";
        public const string DefaultProvide = "Provide";
        public const string DefaultIgnoreMultiTenancy = "IgnoreMultiTenancy";

        public string Default
        {
            get {
                if (this.ContainsKey(DefaultConnectionStringName))
                {
                    return this[DefaultConnectionStringName];
                }
                return default;
            }
            set => this[DefaultConnectionStringName] = value;
        }
        public string Provide
        {
            get
            {
                if (this.ContainsKey(DefaultProvide))
                {
                    return this[DefaultProvide];
                }
                return default;
            }
            set => this[DefaultProvide] = value;
        }
        public string EnableMultiTenancy
        {
            get
            {
                if (this.ContainsKey(DefaultIgnoreMultiTenancy))
                {
                    return this[DefaultIgnoreMultiTenancy];
                }
                return default;
            }
            set => this[DefaultIgnoreMultiTenancy] = value;
        }
    }
}
